<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="ja" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
	<meta http-equiv="content-script-type" content="text/javascript" />
	<meta name="Description" content="炊き出したんは炊き出し情報をつぶやくボットです。" />
	<meta name="Keywords" content="炊き出したん,たきだしたん,Hack For Japan" />
	<meta name="robots" content="INDEX,FOLLOW" />
	<title>炊き出し情報</title>
	
<script type="text/javascript" src="js/jquery.js" ></script>
<script type="application/javascript">
<!--
function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i <hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}

$(document).ready(function(){
  // ここに処理を記述します
  $.get(
    "search2",
    {
	lat: getUrlVars()["lat"],
	lng: getUrlVars()["lng"],
	m: getUrlVars()["m"],
	n: getUrlVars()["n"],
     },
    function(json) {
      if (json.status == 'OK') {
        $.each(json.array, function(i, val) {
        	$('#tbl').append(
				$('<tr>').append(
					$('<td>').attr('bgcolor', '#f5f5f5').text('No.'+i)
    			)
				.append(
					$('<td>').attr('bgcolor', '#f5f5f5').append(
						$('<a>').attr('href', val.map).html(val.title)
					)
    			)
			).append(
				$('<tr>').append(
					$('<td>').attr('colspan', '2').attr('bgcolor', '#ffffff').html(val.body)
    			)
			)
        });
  
      } else {
        alert(json.errorMessage);
      }
    });
});
//-->
</script></head>

<body>
<table id="tbl" width="100%" border=1 cellspacing=0 cellpadding=3　bordercolordark="#ffffff" bordercolor="#777777" />
</body>
</html>
